<div id="body_container">
    <div class="detail_container">
      <div class="detail_box">
        <div class="detail_top_curve">
          <div class="detail_detail_content">
            <div class="welcomezone">
              <div style="margin-bottom:10px;">
                <div class="blueboldheading">
                  <h1>Inbox</h1>
                </div>

<p><strong><a href = "/private_message/new"><span>Write a new message</span></a></p></strong>
</p2>
</ul>
</br>
</br>

<script>
var refreshId = setInterval(function()
{
     $('#reload').fadeOut("slow").load('inbox.html.erb').fadeIn("slow");
}, 5000);
</script>

<div id="reload">
<center>
<% if @messages.empty? %>
<p2>You don't have any messages !</p2>
<% else %>
<% @messages.each do |msg| %>

	

	Subject: </p2><%= msg.subject%></br>
	From: </p2><%= msg.receiver %><br/>
	<I>
	<%= link_to 'Show',"/message/"+msg.id.to_s()%>
	<%= link_to 'Delete',"/delete/"+msg.id.to_s() %>
	</I>
	</p2>
	</br>
	</br>
	</br>
	<% end %>
	
<% end %>
</center>
</div>
</br>
</br>
